<template>
  <div>
    <van-tabs v-model="active">
      <van-tab title="课程">
        <van-card
          v-for="(item, index) in this.list1"
          :key="index"
          @click="
            $router.push({
              path: '/showmoreVideo',
              query: {
                cid: item.cid,
              },
            })
          "
          :desc="item.desc"
          :title="item.title"
          :thumb="'http://video.zjsxjy.com' + item.face"
          :price="item.expire_time_str"
          :num="item.pay_price_html"
        >
        </van-card>
      </van-tab>
      <van-tab title="套餐"
        ><img class="empty" src="../../../assets/images/empty-buy.png" alt=""
      /></van-tab>
      <van-tab title="直播"
        ><img class="empty" src="../../../assets/images/empty-buy.png" alt=""
      /></van-tab>
    </van-tabs>
  </div>
</template>

<script>
import { courseBuy, courseCate, courseLive } from '@/api'
export default {
  data() {
    return {
      active: 0,
      uid: this.$store.state.uid,
      //tab1
      list1: null,
    }
  },
  created() {
    this.getList1()
  },
  mounted() {},
  methods: {
    async getList1() {
      try {
        const { data: res } = await courseBuy({ uid: this.uid })
        console.log(res.data.order, '购买')
        this.list1 = res.data.order
      } catch (err) {
        console.log(err)
      }
    },
  },
}
</script>
<style scoped>
.empty {
  width: 375px;
}
</style>
